<script type="text/javascript">
    // increase the default animation speed to exaggerate the effect
           
    $(document).ready(function() {	
        
        var r= $('.display').dataTable({
           "bPaginate": false,
        "bLengthChange": false,
        "bFilter": true,
        "bSort": false,
        "bInfo": false,
        "bAutoWidth": false                     
        });
    });
   
</script>

<table class="tabla" style="width: 95%">
    <thead>
        <tr>
            <th>Número</th>
            <th>Fecha de inicio</th>
            <th>Fecha finalización </th>            
            <th>Monto</th>
            <th>Editar</th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($cuentas as $cuenta): ?>
            <tr>
                <td><?php echo $cuenta['Account']['numero'] ?></td>
                <td><?php echo $cuenta['Account']['fecha_inicio'] ?></td>
                <td><?php echo $cuenta['Account']['fecha_final'] ?></td>
                <td><?php echo $cuenta['Account']['monto'] ?></td>
                <td><?php echo $this->Ajax->link('Editar', array('controller' => 'Accounts', 'action' => 'edit', $cuenta['Account']['id']), array('update' => 'content', 'indicator' => 'loading','title'=>'Editar los datos correspondientes a esta cuenta de cobro')) ?></td>
                <td><?php echo $this->Ajax->link('Informe de Actividades', array('controller' => 'AccountObligations', 'action' => 'index', $cuenta['Account']['id']), array('update' => 'content', 'indicator' => 'loading','title'=>'Crear el informe  agregando actividades que están en el contrato ')) ?></td>
                <td><?php echo $this->Ajax->link('Formato F-16', array('controller' => 'Accounts', 'action' => 'edit_retention', $cuenta['Account']['id']), array('update' => 'content', 'indicator' => 'loading','title'=>'Crear o editar  formato F-16 ' )) ?></td>
                <td><?php echo $this->Ajax->link('Certificación estandar', array('controller' => 'Accounts', 'action' => 'edit_contract_certification', $cuenta['Account']['id']), array('update' => 'content', 'indicator' => 'loading','title'=>'Crear o editar  formato F-17 ')) ?></td>
                <td><?php echo $this->Ajax->link('*IMPRIMIR*', array('controller' => 'Accounts', 'action' => 'print_index', $cuenta['Account']['id']), array('update' => 'content', 'indicator' => 'loading','title'=>'Imprimir todos los documentos de esta cuenta')) ?></td>        

            </tr>            
        <?php endforeach; ?>
    </tbody>
</table>


<br><br><br>
<table border="0"  CellSpacing=10  align="center">
    <tr>
        <td>Regresar</td>
        <td>Agregar cuenta de cobro</td>
        <td>Imprimir informe final</td>
    </tr>
    <tr>
        <td align="center"> <?php echo $this->Ajax->link($this->Html->image("regresar.gif", array('width' => '30', 'heigth' => '30', 'alt' => 'Adicionar usuario')), array('controller' => "Contracts", "action" => "index", $this->Session->read('contract_user')), array('update' => 'content', 'indicator' => 'loading', 'escape' => false), null) ?></td>
        <td align="center"><?php echo $this->Ajax->link($this->Html->image("add.png", array('width' => '30', 'heigth' => '30', 'alt' => 'Adicionar cuenta')), array('controller' => "Accounts", "action" => "add", $contract_id), array('update' => 'content', 'indicator' => 'loading', 'escape' => false)) ?></td>
        <td align="center"> <?php echo $this->Html->link($this->Html->image("pdf.png", array('width' => '30', 'heigth' => '30', 'alt' => 'Adicionar proyecto')), array('controller' => "AccountObligations", "action" => "total_report", $contract_id), array('target' => '_blank', 'escape' => false)) ?></td>
    </tr>

</table> 
